{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\FEVS_2012.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}17 Jun 2021, 23:05:48

{com}. import delimited "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\FEVS\FEVS_2010-2019\FEVS2012_PRDF.csv"
{res}{text}(97 vars, 687,687 obs)

{com}. svyset [pweight=postwt]

      {txt}pweight:{col 16}{res}postwt
          {txt}VCE:{col 16}{res}linearized
  {txt}Single unit:{col 16}{res}missing
     {txt}Strata 1:{col 16}<one>
         SU 1:{col 16}<observations>
        FPC 1:{col 16}<zero>
{p2colreset}{...}

{com}. 
. 
. 
. 
. 
. drop if q17=="X"
{txt}(27,152 observations deleted)

{com}. 
. drop if q17==""
{txt}(4,078 observations deleted)

{com}. 
. drop if q37=="X"
{txt}(26,254 observations deleted)

{com}. 
. drop if q37==""
{txt}(16,967 observations deleted)

{com}. 
. drop if q38=="X"
{txt}(26,450 observations deleted)

{com}. 
. drop if q38==""
{txt}(3,854 observations deleted)

{com}. 
. drop if q15=="X"
{txt}(5,481 observations deleted)

{com}. 
. drop if q15==""
{txt}(1,450 observations deleted)

{com}. 
. drop if q22=="X"
{txt}(19,007 observations deleted)

{com}. 
. drop if q22==""
{txt}(2,304 observations deleted)

{com}. 
. drop if q25=="X"
{txt}(9,807 observations deleted)

{com}. 
. drop if q25==""
{txt}(1,739 observations deleted)

{com}. 
. drop if q33=="X"
{txt}(10,403 observations deleted)

{com}. 
. drop if q33==""
{txt}(2,967 observations deleted)

{com}. 
. drop if q48==.
{txt}(5,718 observations deleted)

{com}. 
. drop if q49==.
{txt}(1,343 observations deleted)

{com}. 
. 
. 
. destring q17, replace
{txt}q17: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q37, replace
{txt}q37: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q38, replace
{txt}q38: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q15, replace
{txt}q15: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q22, replace
{txt}q22: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q25, replace
{txt}q25: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. destring q33, replace
{txt}q33: all characters numeric; {res}replaced {txt}as {res}byte

{com}. 
. 
. 
. svy linearized : sem (JUSTICE -> DISTRIBUTIVE, ) (JUSTICE -> PROCEDURAL, ) (JUSTICE -> INTERPERSONAL, ) (DISTRIBUTIVE -> q22, ) (DISTRIBUTIVE -> q25, ) (DISTRIBUTIVE -> q33, ) (PROCEDURAL -> q15, ) (PROCEDURAL -> q17, ) (PROCEDURAL -> q37, ) (PROCEDURAL -> q38, )(INTERPERSONAL -> q48, ) (INTERPERSONAL -> q49, ), standardized latent(JUSTICE DISTRIBUTIVE PROCEDURAL INTERPERSONAL ) nocapslatent
{txt}(running sem on estimation sample)
{res}
{txt}{col 1}Survey: Structural equation model{col 49}Number of obs{col 67}= {res}   522,713
{txt}{col 1}Number of strata{col 22}= {res}        1{txt}{col 49}Population size{col 67}={res}  1,417,174
{txt}{col 1}Number of PSUs{col 22}= {res}  522,713{txt}{col 49}Design df{col 67}= {res}   522,712

{p 0 7}{space 1}{text:( 1)}{space 1} [q22]DISTRIBUTIVE = 1{p_end}
{p 0 7}{space 1}{text:( 2)}{space 1} [q15]PROCEDURAL = 1{p_end}
{p 0 7}{space 1}{text:( 3)}{space 1} [q48]INTERPERSONAL = 1{p_end}
{p 0 7}{space 1}{text:( 4)}{space 1} [DISTRIBUTIVE]JUSTICE = 1{p_end}
{txt}{hline 20}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 21}{c |}{col 33}  Linearized
{col 1}       Standardized{col 21}{c |}      Coef.{col 33}   Std. Err.{col 45}      t{col 53}   P>|t|{col 61}     [95% Con{col 74}f. Interval]
{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}Structural         {col 21}{txt}{c |}
{space 2}{col 3}DISTRIBUTIVE     {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .8526719{col 33}{space 2}  .001468{col 44}{space 1}  580.86{col 53}{space 3}0.000{col 61}{space 4} .8497948{col 74}{space 3}  .855549
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}PROCEDURAL       {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .9801045{col 33}{space 2} .0015587{col 44}{space 1}  628.79{col 53}{space 3}0.000{col 61}{space 4} .9770494{col 74}{space 3} .9831595
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}INTERPERSONAL    {col 21}{c |}
{space 12}JUSTICE {c |}{col 21}{res}{space 2} .7078238{col 33}{space 2} .0017835{col 44}{space 1}  396.88{col 53}{space 3}0.000{col 61}{space 4} .7043282{col 74}{space 3} .7113193
{txt}{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}{res}Measurement        {col 21}{txt}{c |}
{space 2}{col 3}q22              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .8387933{col 33}{space 2} .0010975{col 44}{space 1}  764.25{col 53}{space 3}0.000{col 61}{space 4} .8366422{col 74}{space 3} .8409445
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.404982{col 33}{space 2} .0037526{col 44}{space 1}  640.89{col 53}{space 3}0.000{col 61}{space 4} 2.397627{col 74}{space 3} 2.412337
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q25              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .8292988{col 33}{space 2} .0011227{col 44}{space 1}  738.64{col 53}{space 3}0.000{col 61}{space 4} .8270983{col 74}{space 3} .8314993
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.487529{col 33}{space 2} .0041086{col 44}{space 1}  605.45{col 53}{space 3}0.000{col 61}{space 4} 2.479476{col 74}{space 3} 2.495582
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q33              {col 21}{c |}
{space 7}DISTRIBUTIVE {c |}{col 21}{res}{space 2} .7026215{col 33}{space 2} .0014793{col 44}{space 1}  474.98{col 53}{space 3}0.000{col 61}{space 4} .6997221{col 74}{space 3} .7055208
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.218395{col 33}{space 2} .0030773{col 44}{space 1}  720.89{col 53}{space 3}0.000{col 61}{space 4} 2.212363{col 74}{space 3} 2.224426
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q15              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2}  .618589{col 33}{space 2}  .002109{col 44}{space 1}  293.31{col 53}{space 3}0.000{col 61}{space 4} .6144555{col 74}{space 3} .6227226
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.206889{col 33}{space 2} .0071869{col 44}{space 1}  446.21{col 53}{space 3}0.000{col 61}{space 4} 3.192802{col 74}{space 3} 3.220975
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q17              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .7455866{col 33}{space 2} .0015253{col 44}{space 1}  488.82{col 53}{space 3}0.000{col 61}{space 4} .7425971{col 74}{space 3} .7485761
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.936396{col 33}{space 2} .0059523{col 44}{space 1}  493.32{col 53}{space 3}0.000{col 61}{space 4}  2.92473{col 74}{space 3} 2.948063
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q37              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .8222528{col 33}{space 2} .0012803{col 44}{space 1}  642.23{col 53}{space 3}0.000{col 61}{space 4} .8197434{col 74}{space 3} .8247621
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 2.684064{col 33}{space 2} .0049817{col 44}{space 1}  538.78{col 53}{space 3}0.000{col 61}{space 4}   2.6743{col 74}{space 3} 2.693828
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q38              {col 21}{c |}
{space 9}PROCEDURAL {c |}{col 21}{res}{space 2} .8024427{col 33}{space 2} .0014112{col 44}{space 1}  568.61{col 53}{space 3}0.000{col 61}{space 4} .7996767{col 74}{space 3} .8052086
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.263792{col 33}{space 2} .0074656{col 44}{space 1}  437.18{col 53}{space 3}0.000{col 61}{space 4}  3.24916{col 74}{space 3} 3.278424
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q48              {col 21}{c |}
{space 6}INTERPERSONAL {c |}{col 21}{res}{space 2} .9331214{col 33}{space 2} .0009682{col 44}{space 1}  963.81{col 53}{space 3}0.000{col 61}{space 4} .9312239{col 74}{space 3}  .935019
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.673245{col 33}{space 2} .0088272{col 44}{space 1}  416.13{col 53}{space 3}0.000{col 61}{space 4} 3.655944{col 74}{space 3} 3.690546
{space 2}{txt}{hline 18}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 2}{col 3}q49              {col 21}{c |}
{space 6}INTERPERSONAL {c |}{col 21}{res}{space 2} .9137565{col 33}{space 2} .0010495{col 44}{space 1}  870.68{col 53}{space 3}0.000{col 61}{space 4} .9116996{col 74}{space 3} .9158134
{txt}{space 14}_cons {c |}{col 21}{res}{space 2} 3.946879{col 33}{space 2} .0104396{col 44}{space 1}  378.07{col 53}{space 3}0.000{col 61}{space 4} 3.926418{col 74}{space 3} 3.967341
{txt}{hline 20}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 10}var(e.q22){c |}{col 21}{res}{space 2} .2964258{col 33}{space 2} .0018412{col 61}{space 4} .2928389{col 74}{space 3} .3000565
{txt}{space 10}var(e.q25){c |}{col 21}{res}{space 2} .3122635{col 33}{space 2} .0018622{col 61}{space 4}  .308635{col 74}{space 3} .3159347
{txt}{space 10}var(e.q33){c |}{col 21}{res}{space 2} .5063231{col 33}{space 2} .0020787{col 61}{space 4} .5022652{col 74}{space 3} .5104138
{txt}{space 10}var(e.q15){c |}{col 21}{res}{space 2} .6173476{col 33}{space 2} .0026092{col 61}{space 4} .6122548{col 74}{space 3} .6224828
{txt}{space 10}var(e.q17){c |}{col 21}{res}{space 2} .4441007{col 33}{space 2} .0022744{col 61}{space 4} .4396651{col 74}{space 3} .4485809
{txt}{space 10}var(e.q37){c |}{col 21}{res}{space 2} .3239004{col 33}{space 2} .0021055{col 61}{space 4} .3197999{col 74}{space 3} .3280535
{txt}{space 10}var(e.q38){c |}{col 21}{res}{space 2} .3560857{col 33}{space 2} .0022649{col 61}{space 4} .3516742{col 74}{space 3} .3605526
{txt}{space 10}var(e.q48){c |}{col 21}{res}{space 2} .1292844{col 33}{space 2} .0018068{col 61}{space 4} .1257912{col 74}{space 3} .1328746
{txt}{space 10}var(e.q49){c |}{col 21}{res}{space 2} .1650491{col 33}{space 2} .0019179{col 61}{space 4} .1613325{col 74}{space 3} .1688513
{txt}{space 1}var(e.DISTRIBUTIVE){c |}{col 21}{res}{space 2} .2729506{col 33}{space 2} .0025034{col 61}{space 4}  .268088{col 74}{space 3} .2779015
{txt}{space 3}var(e.PROCEDURAL){c |}{col 21}{res}{space 2} .0393952{col 33}{space 2} .0030554{col 61}{space 4} .0338396{col 74}{space 3} .0458629
{txt}var(e.INTERPERSONAL){c |}{col 21}{res}{space 2} .4989855{col 33}{space 2} .0025248{col 61}{space 4} .4940615{col 74}{space 3} .5039586
{txt}{space 8}var(JUSTICE){c |}{col 21}{res}{space 2}        1{col 33}{space 2}        .{col 61}{space 4}        .{col 74}{space 3}        .
{txt}{hline 20}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

{com}. 
. 
. 
. estat gof, stats(all)
{res}
{txt}{hline 21}{c TT}{hline 54}
{lalign 21:Fit statistic}{c |}      Value   Description
{hline 21}{c +}{hline 54}
{lalign 21:Size of residuals}{c |}
{ralign 20:SRMR} {c |} {res}{ralign 10:     0.039}{txt}   Standardized root mean squared residual
{ralign 20:CD} {c |} {res}{ralign 10:     0.966}{txt}   Coefficient of determination
{hline 21}{c BT}{hline 54}
{p 0 2 2 75}Note: model was fit with{txt} svy: prefix; only stats(residuals) valid.{p_end}

{com}. predict justice, latent(JUSTICE)
{res}
{com}. 
. 
. 
. egen average_justice = mean (justice), by (agency)

. 
. 
. 
. egen sub_average_justice = mean (justice), by (subelem)

. save "C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\2012FEVS_Justice.dta"
{txt}file C:\Users\jp18390\Dropbox\DISCRIMINATION PROJECT (U.S. FEDERAL AGENCIES)\Age Discrimination Project\Organizational Justice_Factor Scores 2010-2019\2012FEVS_Justice.dta saved

{com}. exit, clear
